home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
smaltalk
/
manchest.lha
/
MANCHESTER
/
manchester
/
2.2
/
StandardSystemViewUpdate.st
< prev
next >
Wrap
Text File
|
1993-07-24
|
2KB
|
90 lines
" NAME StandardSystemViewUpdate
AUTHOR rmd@cs.man.ac.uk
FUNCTION St'dSys'View now can be subview
ST-VERSIONS 2.2
PREREQUISITES
CONFLICTS
DISTRIBUTION world
VERSION 1.1
DATE 22 Jan 1989
SUMMARY StandardSystemViewUpdate
fixes up StandardSystemView so that it
can be used as a subView as well as a topView. This was only half
implemented in the standard image.(2.2).RMD
"!
'From Smalltalk-80, Version 2.2 of July 4, 1987 on 14 June 1988 at 2:30:33 pm'!
!StandardSystemView methodsFor: 'clipping box access'!
clippingBox
"Answer the rectangular area to which the receiver is to be clipped."
^self isTopView
ifTrue: [self labelDisplayBox]
ifFalse: [self labelDisplayBox intersect: superView insetDisplayBox]!
insetClippingBox
"Answer the rectangular area inside the labelDisplayBox, clipped to the outer view if necessary"
^self isTopView
ifTrue: [self labelDisplayBox inside]
ifFalse: [self labelDisplayBox inside intersect: superView insetDisplayBox]! !
!StandardSystemView methodsFor: 'private'!
reverseLabel
"Reverse the label."
labelText isNil ifFalse: [Display reverse: self
insetClippingBox]! !
!StandardSystemView methodsFor: 'displaying'!
displayView
"I just display my label."
self displayLabel! !
!StandardSystemView methodsFor: 'displaying'!
displayLabel
"I display the label of my view."
| labelDisplayBox |
labelDisplayBox _ self labelDisplayBox.
self isCollapsed ifTrue: [^self].
labelDisplayBox displayOn: Display clippingBox: self clippingBox.
labelText isNil
ifFalse:
[isLabelComplemented _ false.
labelText
displayOn: Display
at: (labelDisplayBox center -
(labelText boundingBox center -
labelText boundingBox topLeft))
clippingBox: self insetClippingBox]! !
!Quadrangle methodsFor: 'displaying'!
displayOn: aDisplayMedium clippingBox: aClippingBox
"Display the border and insideRegion of the receiver, with the
quadrangle properly clipped to aClippingBox"
insideColor ~~ nil
ifTrue:
[borderWidth ~~ 0 ifTrue: [aDisplayMedium fill: (self region intersect: aClippingBox)
mask: borderColor].
aDisplayMedium fill: (self inside intersect: aClippingBox)
mask: insideColor]! !